<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<link rel="stylesheet" href="__CONTROL_TPL__/css/user.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/uploadify/uploadify.css">
	<title>后盾网学员项目-仿哇塞网</title>
</head>
<body>
<if value="!isset($hd.session.uid) or !isset($hd.session.username)">
	<script type="text/javascript">
		location.href="{|U:'LogReg/login'}"
	</script>
</if>
<!-- 公用头部开始 -->
<include file="__TPL__/Common/head"/>
<include file="__CONTROL_TPL__/comment"/>
<script type="text/javascript" src='__CONTROL_TPL__/js/user.js'></script>
<script type="text/javascript" src="__PUBLIC__/uploadify/jquery.uploadify.min.js"></script>
<!-- 用于ajax发送的地址 -->
<script type="text/javascript">
	var recevied_goods_url=APP+'&c=User&m=ajax_recevied_goods';//收货
	var show_ordergoods_url=APP+'&c=User&m=ajax_show_ordergoods';//显示订单的商品
	var goods_url=APP+'&c=Details&m=index&w=comment&gid=';//商品链接
</script>
<style type="text/css">
	.uploadify-button{
        border: none;
        padding: 0;
        background: none repeat scroll 0 0 rgba(0, 0, 0, 0.2);
        border-radius: 0px;
	}
</style>
<script type="text/javascript">
    $(function() {
        $('#uheadimg').uploadify({
            'swf'      : PUBLIC + '/uploadify/uploadify.swf',    //指定上传控件的主体文件
            'uploader' : CONTROL + '&m=up',   //指定服务器端上传处理文件
            width : 160,
            height: 24,
            uploadLimit : 1,
            buttonText	:"使用新头像",
            //其他配置项
            'onUploadSuccess':function(file, data, response){
            	// $('input[name=up]').val(data);
            	$('.headimgShow').attr('src', '" + ROOT + '/' + data + "');
            }
        });
    });
</script>
<!-- 公用头部结束 -->

<div id="user">
	<div class="userInfoTop">
		<div class="width1100 fixed">
			<dl class="fl uITL">
				<dt class="fl">
					<img class="headimgShow" width="160" height="160" 
					<if value="is_file($user['uheadimg'])">
						src="{$user.uheadimg}"
					<else/>
						src="__CONTROL_TPL__/images/avatar.jpg"
					</if>>
					<!-- <form action="" method="post">
						<input type="file" name="uheadimg" id="uheadimg" value="上传新头像"/>
					</form> -->
				</dt>
				<dd class="fr">
					<h3 id="myhomeusername" class="size26 black">
					<if value="!empty($user['uname'])">{$user.uname}<else/>{$user.uaccount}</if></h3>
					<p class="uITtime">{$user.uregtime|hd_date} 加入</p>
					<p class="uITdes">七米陈磊商城开发。如果需要,请记住我^.^ TEL：18976686378；QQ：18976686378</p>
				</dd>
			</dl>
			<div class="fr uITR">
				<ul class="fixed">
					<li class="fl ct">
						<span class="size22 color" href="/index.php?app=store&id=849749"><if value="isset($hd.session.cart.total_rows)">{$hd.session.cart.total_rows}<else/>0</if></span>
						<p>购物车</p>
					</li>
					<li class="fl ct">
						<span class="size22 color" href="/index.php?app=user&uid=849749&act=guan">{$count.o}</span>
						<p>待付款</p>
					</li>
					<li class="fl ct last">
						<span class="size22 color" href="/index.php?app=user&uid=849749&act=fans">{$count.p}</span>
						<p>待收货</p>
					</li>
				</ul>
				<div class="uITRBtn fixed"> </div>
			</div>
		</div>
		<div class="width1100 userInfoNavBox">
			<ul class="fixed userInfoNav">
				<!-- <li class="fl on">首页</li> -->
				<li class="fl on">购物车</li>
				<li class="fl ">去付款</li>
				<li class="fl ">待收货</li>
				<li class="fl ">快评价</li>
			</ul>
		</div>
	</div>
	<!-- 首页 -->
	<!-- <div class="userInfoBox" style="display:block">
		<div class="width1100">
			<div class="userInfoIndexList">
				<div class="ws_message_body">
					<div class="ws_message_count">
						<span style="float:left;">共16条通知</span>
						<ul>
							<li>
								<a href="" target="_blank">查看详细>>></a>
							</li>
						</ul>
						<div class="clear"></div>
					</div>
					<ul class="ws_message_list js_message_list">
						<li>
							<div class="ws_message_avatar">
								<a target="_blank">
									<img style="width: 32px; height: 32px; display: inline;" src="">
								</a>
							</div>
							<div class="ws_message_profile">
								<div class="ws_message_content">
									<span class="comment_message" style="margin:0 0 0 20px;">亲爱的℃ㄑ,你在哇噻网的订单已经提交，订单号1411000459，您可以在个人账户中查看订单详情；感谢您选择哇噻网，原创产品库存有限，请您尽快付款，以免抢不到宝贝哟~</span>
									<span class="date_message">
										<input class="checkitem" type="checkbox" value="775407">
									</span>
									<div class="clear"></div>
								</div>
								<div class="ws_message_info">
									<span class="message_info_left" style="font-size:10px;margin:0 0 0 20px;">04月21日 09:37</span>
									<div class="clear"></div>
								</div>
							</div>
							<div class="clear"></div>
						</li>
						<li>
							<div class="ws_message_avatar">
								<a target="_blank">
									<img style="width: 32px; height: 32px; display: inline;" src="">
								</a>
							</div>
							<div class="ws_message_profile">
								<div class="ws_message_content">
									<span class="comment_message" style="margin:0 0 0 20px;">亲爱的℃ㄑ,你在哇噻网的订单已经提交，订单号1411000459，您可以在个人账户中查看订单详情；感谢您选择哇噻网，原创产品库存有限，请您尽快付款，以免抢不到宝贝哟~</span>
									<span class="date_message">
										<input class="checkitem" type="checkbox" value="775407">
									</span>
									<div class="clear"></div>
								</div>
								<div class="ws_message_info">
									<span class="message_info_left" style="font-size:10px;margin:0 0 0 20px;">04月21日 09:37</span>
									<div class="clear"></div>
								</div>
							</div>
							<div class="clear"></div>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div> -->
	<!-- 购物车 -->
	<div class="userInfoBox" style="display:block">
		<div class="width1100">
			<div class="userInfoIndexList">
				<div class="ws_message_body">
					<div class="ws_message_count">
						<if value="isset($hd.session.cart.total_rows)">
							<span style="float:left;">购物车中共有 [{$hd.session.cart.total_rows}] 件宝贝，共计：￥{$hd.session.cart.total}</span>
							<ul>
								<li>
									<a href="{|U:'Order/cart'}">查看详细>>></a>
								</li>
							</ul>
						<else/>
							<span style="float:left;">购物车中还没有宝贝呦~，快来<a href="{|U:'Category/top_list'}"> 采购 </a>吧！</span>
						</if>
						<div class="clear"></div>
					</div>
					<ul class="ws_message_list js_message_list">
						<foreach from="{$hd.session.cart.goods}" value="$value">
							<li>
								<div class="ws_message_avatar">
									<a target="_blank">
										<img style="width: 32px; height: 32px; display: inline;" src="{$value.imgUrl}">
									</a>
								</div>
								<div class="ws_message_profile">
									<div class="ws_message_content">
										<span class="comment_message" style="margin:0 0 0 20px;">{$value.name}</span>
										<div class="clear"></div>
									</div>
									<div class="ws_message_info">
										<span class="message_info_left" style="font-size:10px;margin:0 0 0 20px;">数量：{$value.num}，小计：￥{$value.total}</span>
										<div class="clear"></div>
									</div>
								</div>
								<div class="clear"></div>
							</li>
						</foreach>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<!-- 去付款 -->
	<div class="userInfoBox" style="display:none">
		<div class="width1100">
			<div class="userInfoIndexList">
				<div class="ws_message_body">
					<div class="ws_message_count">
						<span style="float:left;">您共有 [{$count.o}] 笔订单未付款</span>
						<div class="clear"></div>
					</div>
					<ul class="ws_message_list js_message_list">
						<foreach from="$order" value="$value">
							<if value="$value['ostate']!=1">
							<?php continue;?>
							</if>
								<li>
									<div class="ws_message_avatar">
										<a target="_blank">
											<img style="width: 32px; height: 32px; display: inline;" <if value="is_file($user['uheadimg'])">src="{$user.uheadimg}"<else/>src="__CONTROL_TPL__/images/avatar.jpg"</if>>
										</a>
									</div>
									<div class="ws_message_profile">
										<div class="ws_message_content">
											<span class="comment_message" style="margin:0 0 0 20px;">亲爱的<if value="!empty($user['uname'])">{$user.uname}<else/>{$user.uaccount}</if>,你在哇噻网的订单已经提交，订单号：{$value.oid}；订单金额：￥{$value.ototal}。感谢您选择哇噻网，原创产品库存有限，请您尽快付款，以免抢不到宝贝哟~</span>
											<span class="date_message">
												<a href="{|U:'Order/payment',array('oid'=>$value['oid'])}">立即付款</a>
											</span>
											<div class="clear"></div>
										</div>
										<div class="ws_message_info">
											<span class="message_info_left" style="font-size:10px;margin:0 0 0 20px;">{$value.oorder_time|hd_date:'y-m-d H:i:s'}</span>
											<div class="clear"></div>
										</div>
									</div>
									<div class="clear"></div>
								</li>
							
						</foreach>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<!-- 待收货 -->
	<div class="userInfoBox" style="display:none">
		<div class="width1100">
			<div class="userInfoIndexList">
				<div class="ws_message_body">
					<div class="ws_message_count">
						<span style="float:left;">您共有 [<span class="recevied_num">{$count.p}</span>] 笔订单待收货</span>
						<div class="clear"></div>
					</div>
					<ul class="ws_message_list js_message_list recevied_box">
						<foreach from="$order" value="$value">
							<if value="$value['ostate']!=3">
							<?php continue;?>
							</if>
							<li>
								<div class="ws_message_avatar">
									<a target="_blank">
										<img style="width: 32px; height: 32px; display: inline;" <if value="is_file($user['uheadimg'])">src="{$user.uheadimg}"<else/>src="__CONTROL_TPL__/images/avatar.jpg"</if>>
									</a>
								</div>
								<div class="ws_message_profile">
									<div class="ws_message_content">
										<span class="comment_message" style="margin:0 0 0 20px;">亲爱的<if value="!empty($user['uname'])">{$user.uname}<else/>{$user.uaccount}</if>,你在哇噻网的订单已经发货，订单号：{$value.oid}；订单金额：￥{$value.ototal}。感谢您选择哇噻网，请您尽快收货，收货完成后记得给我们评价哟~</span>
										<span class="date_message">
											<a class="recevied_goods" href="javascript:" oid="{$value.oid}">立即收货</a>
										</span>
										<div class="clear"></div>
									</div>
									<div class="ws_message_info">
										<span class="message_info_left" style="font-size:10px;margin:0 0 0 20px;">{$value.oorder_time|hd_date:'y-m-d H:i:s'}</span>
										<div class="clear"></div>
									</div>
								</div>
								<div class="clear"></div>
							</li>
						</foreach>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<!-- 快评价 -->
	<div class="userInfoBox" style="display:none">
		<div class="width1100">
			<div class="userInfoIndexList">
				<div class="ws_message_body">
					<div class="ws_message_count">
						<span style="float:left;">您共有 [{$count.c}] 笔购物记录。如需评价，请点击订单右侧的“查看详细”</span>
						<div class="clear"></div>
					</div>
					<ul class="ws_message_list js_message_list">
						<foreach from="$order" value="$value">
							<if value="$value['ostate']!=4">
							<?php continue;?>
							</if>
							<li>
								<div class="ws_message_avatar">
									<a target="_blank">
										<img style="width: 32px; height: 32px; display: inline;" <if value="is_file($user['uheadimg'])">src="{$user.uheadimg}"<else/>src="__CONTROL_TPL__/images/avatar.jpg"</if>>
									</a>
								</div>
								<div class="ws_message_profile">
									<div class="ws_message_content">
										<span class="comment_message" style="margin:0 0 0 20px;">亲爱的<if value="!empty($user['uname'])">{$user.uname}<else/>{$user.uaccount}</if>,你在哇噻网的订单已经发货，订单号：{$value.oid}；订单金额：￥{$value.ototal}。感谢您选择哇噻网，请您尽快收货，收货完成后记得给我们评价哟~</span>
										<span class="date_message">
											<a class="show_ordergoods" href="javascript:" oid="{$value.oid}">查看详细</a>
										</span>
										<div class="clear"></div>
									</div>
									<div class="ws_message_info">
										<span class="message_info_left" style="font-size:10px;margin:0 0 0 20px;">{$value.oorder_time|hd_date:'y-m-d H:i:s'}</span>
										<div class="clear"></div>
									</div>
								</div>
								<div class="clear"></div>
							</li>
						</foreach>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div class="clear"></div>
</div>

<!-- 公用页脚开始 -->
<include file="__TPL__/Common/footer"/>
<!-- 公有页脚结束 -->	
</body>
</html>